struct client {
	pthread_t thread;
	int id;
	int sockfd;
	char color; // 1 - Black / 2 - White
	char ip[15];
} *clients;

struct game {
	int id;
	char name[32];
	char play; // 0 - Никого (Можно создать игру). 1 - Один игрок (Ждет подключения). 2 - Два игрока (Полная).
	char checkers[8][8];
	int countchecks[2];
	int num_move;
	struct client *black, *white;
} *games;

struct sockaddr_in serveraddr;
int port ;
int sockfd;
int gamecount;
int idGame, idClient;
FILE *logfile;
time_t howtime;

// lobby.c
extern void *lobby(void *);

//ingame.c
extern int inGame(struct game *, struct client *);

//gameaction.c
extern void sendGameList(int);
extern struct game *createGame(struct client *, char[]);
extern void destroyGame(struct game *);

//rootsosnol.c
extern struct client *findClient(int, int, struct client *);

extern int send_move (int[9], struct game *);


